<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>margin demo</title>
    <style>
        .wrapper {
            border: solid 4px #3a4243;
            height: 400px;
            width: 300px;
            position: relative;
        }
        .inner {
            background-color: cadetblue;
            width: 100%;
            height: 50%;
            position: absolute;
            top: 50%;
            /* margin-top: 66.666%; */
        }
    </style>
</head>
<body>
    <div class="wrapper">
        <div class="inner"></div>
    </div>
</body>
</html>